package cn.itrip.beans.dtos;

import lombok.Getter;

/**
 * @Author:小伟
 * @Description:
 * @Date:2020-02-28 15:39
 **/
@Getter
public enum  ResultCodeEnum{
    SUCCESS("true","0","成功"),
    UNKNOWN_REASON("false","20001","未知错误"),
    BAD_SQL_GRAMMAR("false","21001","sql语法错误"),
    JSON_PARSE_ERROR("false","21002","json解析异常"),
    PARAM_ERROR("false","21003","参数不正确"),
    USERLOGIN_INVALID_ERROR("false","21007","登陆信息过期,请重新登陆"),
    USERUNLOGIN_ERROR("false","21008","用户未登录,请重新登陆"),
    POST_BOX_ERROR("false","21009","邮箱发送失败,请重新发送"),
    MAILBOX_VERIFICATION_ERROR("false","30001","邮箱验证失败,该邮箱已被注册");
    /**
     * 判断系统是否出错做出相应的true或者false的返回，与业务无关，出现各种异常
     */
    private String success;
    /**
     * 该错误码为自定义，一般0表示无错
     */
    private String errorCode;
    /**
     * 对应的提示信息
     */
    private String msg;

    ResultCodeEnum(String success, String errorCode, String msg) {
        this.success = success;
        this.errorCode = errorCode;
        this.msg = msg;
    }
}
